package com.aistar.util;

import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.stereotype.Component;

@Component  //将该对象 注入到Spring容器中
@Aspect //Log对象定义为切面
public class Log {
    @After("execution(* com.aistar.service..*.save(..))|| execution(* com.aistar.service..*.delete(..))|| execution(* com.aistar.service..*.update(..))")
    public void addLog(){
        System.out.println("记录日志");
    }
}
